<%page args="e, ersvp, table" />

<%include file="header.html" />
<%namespace file="utils.html" import="*" />
<script>

function addrsvp()	{
	$("#addrsvp").load("/events/addrsvp", {"eventid": ${e.EVENTID}});
}

function saversvp()	{
	$("#rsvps").load("/events/saversvp", {"eventid":${e.EVENTID}, "userid": document.forms[1].elements[0].value});
	$("#addrsvp").html("");
}



</script>

<h2>Edit Event
(
<a href="/events/deleteevent?eventid=${e.EVENTID}">Delete</a> 
-
<a href="/events">View All</a>
)
</h2>
${createform(e,table,"/events/saveevent")}
<br />
<div id="rsvps"> </div>
<script> $("#rsvps").load("/events/listrsvps", {"eventid":${e.EVENTID}}); </script>

<a href="javascript:addrsvp()">Add an RSVP</a>
<div id="addrsvp"></div>
</center>
<%include file="footer.html" />
